package com.ruoyi.system.interAttr.attr;

import cn.hutool.crypto.digest.DigestUtil;
import cn.hutool.http.HttpRequest;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.common.utils.UUIDGenerator;
import com.ruoyi.common.utils.http.HttpUtils;
import com.ruoyi.system.interAttr.domain.GamesRes;
import com.ruoyi.system.interAttr.domain.InterAttrRes;
import com.ruoyi.system.interAttr.domain.InterServerRes;
import com.ruoyi.system.model.domain.SalePartner;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

import java.util.*;
import java.util.stream.Collectors;

/**
 * 密码游戏列表没有接口
 *
 * 等对面开发人员写好   2024 06 27
 *
 */
@Slf4j
@Service
public class TWMAttr implements AdapterAttr {


    public static void main(String[] args) {
        Map<String, Object> params1 = new TreeMap<>();
        Map<String, Object> head = new HashMap<>();
        head.put("content-type", "application/x-www-form-urlencoded");
        params1.put("key", "FC72EEEF865B05F63106FC8C14D768D5");
        params1.put("merchant_no", "youyouwangyou");
        params1.put("gameid", 22);
        params1.put("content-type", "application/x-www-form-urlencoded");
        String response = HttpUtils.doPostForm("https://api.taohaoge.com/interfaces/getExpendAttribute.ashx", params1, head);
        System.out.println(response);
    }

    @Override
    public List<GamesRes> getGames(SalePartner salePartner) {
        String result = "[{\"gameId\":3,\"gameName\":\"原神\",\"pinyin\":\"Y\",\"gameIcon\":\"https://res.playfuncat.cn/game/logo/sbw6bpvc3qk5.png\"},{\"gameId\":4,\"gameName\":\"火影忍者\",\"pinyin\":\"H\",\"gameIcon\":\"https://playcat.oss-cn-hangzhou.aliyuncs.com/icon/huo_ying.png\"},{\"gameId\":5,\"gameName\":\"枪战王者\",\"pinyin\":\"Q\",\"gameIcon\":\"https://res.playfuncat.cn/game/logo/6wmqv4hwj7pk.png\"},{\"gameId\":6,\"gameName\":\"英雄联盟\",\"pinyin\":\"Y\",\"gameIcon\":\"https://res.playfuncat.cn/game/logo/h8c6ud8hs1yq.png\"},{\"gameId\":7,\"gameName\":\"QQ飞车\",\"pinyin\":\"Q\",\"gameIcon\":\"https://playcat.oss-cn-hangzhou.aliyuncs.com/icon/qq_car.png\"},{\"gameId\":8,\"gameName\":\"光遇\",\"pinyin\":\"G\",\"gameIcon\":\"https://res.playfuncat.cn/game/logo/rm13xd2nb1x6.png\"},{\"gameId\":17,\"gameName\":\"和平精英\",\"pinyin\":\"H\",\"gameIcon\":\"https://res.playfuncat.cn/game/logo/qhqhxcpftw4s.png\"},{\"gameId\":18,\"gameName\":\"王者荣耀\",\"pinyin\":\"W\",\"gameIcon\":\"https://res.playfuncat.cn/game/logo/1lkaakjeplxm.png\"},{\"gameId\":19,\"gameName\":\"LOL手游\",\"pinyin\":\"L\",\"gameIcon\":\"https://playcat.oss-cn-hangzhou.aliyuncs.com/game/logo/tyc9bq8u5ab1.png\"},{\"gameId\":20,\"gameName\":\"星穹铁道\",\"pinyin\":\"B\",\"gameIcon\":\"https://res.playfuncat.cn/game/logo/vr5mtrqkk2xt.png\"},{\"gameId\":21,\"gameName\":\"逃跑吧少年\",\"pinyin\":\"T\",\"gameIcon\":\"https://playcat.oss-cn-hangzhou.aliyuncs.com/game/logo/jwgao4yy9cum.png\"},{\"gameId\":22,\"gameName\":\"暗区突围\",\"pinyin\":\"A\",\"gameIcon\":\"https://playcat.oss-cn-hangzhou.aliyuncs.com/game/logo/o93ggm73d27s.png\"},{\"gameId\":24,\"gameName\":\"使命召唤手游\",\"pinyin\":\"s\",\"gameIcon\":\"https://res.playfuncat.cn/game/logo/xzca4inqfd8v.png\"},{\"gameId\":25,\"gameName\":\"部落冲突\",\"pinyin\":\"B\",\"gameIcon\":\"https://res.playfuncat.cn/game/logo/3jnn1h6d5hp7.png\"},{\"gameId\":26,\"gameName\":\"球球大作战\",\"pinyin\":\"Q\",\"gameIcon\":\"https://res.playfuncat.cn/game/logo/pjgchu791e7q.png\"},{\"gameId\":27,\"gameName\":\"三国杀\",\"pinyin\":\"S\",\"gameIcon\":\"https://res.playfuncat.cn/game/logo/4tsbyiuvzmak.png\"},{\"gameId\":28,\"gameName\":\"实况足球\",\"pinyin\":\"S\",\"gameIcon\":\"https://res.playfuncat.cn/game/logo/hd6pi6b9ovfy.png\"},{\"gameId\":29,\"gameName\":\"金铲铲之战\",\"pinyin\":\"J\",\"gameIcon\":\"https://res.playfuncat.cn/game/logo/pv5eckaqrx8l.png\"},{\"gameId\":30,\"gameName\":\"第五人格\",\"pinyin\":\"D\",\"gameIcon\":\"https://res.playfuncat.cn/game/logo/odvfvs1hpzu4.png\"},{\"gameId\":31,\"gameName\":\"天涯明月刀手游\",\"pinyin\":\"M\",\"gameIcon\":\"https://res.playfuncat.cn/game/logo/jth5r1y2xw9i.png\"},{\"gameId\":32,\"gameName\":\"航海王热血航线\",\"pinyin\":\"H\",\"gameIcon\":\"https://res.playfuncat.cn/game/logo/dkgvc3h9sq1w.png\"},{\"gameId\":34,\"gameName\":\"王牌战争文明重启\",\"pinyin\":\"W\",\"gameIcon\":\"https://res.playfuncat.cn/game/logo/77lwwz9x31n1.png\"},{\"gameId\":35,\"gameName\":\"王牌竞速\",\"pinyin\":\"W\",\"gameIcon\":\"https://res.playfuncat.cn/game/logo/o8xbobyuqu7q.png\"},{\"gameId\":36,\"gameName\":\"创造与魔法\",\"pinyin\":\"C\",\"gameIcon\":\"https://res.playfuncat.cn/game/logo/z8jm48t3pj1k.png\"},{\"gameId\":37,\"gameName\":\"斗罗大陆魂师对决\",\"pinyin\":\"D\",\"gameIcon\":\"https://res.playfuncat.cn/game/logo/bwktsxippph6.jpg\"},{\"gameId\":38,\"gameName\":\"蛋仔派对\",\"pinyin\":\"D\",\"gameIcon\":\"https://res.playfuncat.cn/game/logo/l792vhh5xg7b.png\"},{\"gameId\":39,\"gameName\":\"香肠派对\",\"pinyin\":\"X\",\"gameIcon\":\"https://res.playfuncat.cn/game/logo/fmtjzwm797m5.png\"},{\"gameId\":40,\"gameName\":\"明日之后手游\",\"pinyin\":\"M\",\"gameIcon\":\"https://res.playfuncat.cn/game/logo/rcws5zs3g5xs.png\"},{\"gameId\":41,\"gameName\":\"逆水寒\",\"pinyin\":\"N\",\"gameIcon\":\"https://res.playfuncat.cn/game/logo/g97j38k1vbpp.png\"},{\"gameId\":42,\"gameName\":\"地下城与勇士\",\"pinyin\":\"D\",\"gameIcon\":\"https://res.playfuncat.cn/game/logo/aba2xa4fq7c6.png\"},{\"gameId\":43,\"gameName\":\"QQ三国\",\"pinyin\":\"Q\",\"gameIcon\":\"https://res.playfuncat.cn/game/logo/3zvd57ejnkw2.png\"},{\"gameId\":44,\"gameName\":\"永劫无间\",\"pinyin\":\"Y\",\"gameIcon\":\"https://res.playfuncat.cn/game/logo/on46j4xihf6r.png\"},{\"gameId\":45,\"gameName\":\"天涯明月刀端游\",\"pinyin\":\"T\",\"gameIcon\":\"https://res.playfuncat.cn/game/logo/6k22zofzqtpp.png\"},{\"gameId\":46,\"gameName\":\"炉石传说\",\"pinyin\":\"L\",\"gameIcon\":\"https://res.playfuncat.cn/game/logo/pyqlkifi942q.png\"},{\"gameId\":47,\"gameName\":\"Steam账号\",\"pinyin\":\"S\",\"gameIcon\":\"https://res.playfuncat.cn/game/logo/32vzl1e9679d.png\"},{\"gameId\":48,\"gameName\":\"剑灵\",\"pinyin\":\"J\",\"gameIcon\":\"https://res.playfuncat.cn/game/logo/k9c9z5o2s4ft.jpg\"},{\"gameId\":49,\"gameName\":\"守望先锋\",\"pinyin\":\"S\",\"gameIcon\":\"https://res.playfuncat.cn/game/logo/f99al2w3ih4y.png\"},{\"gameId\":50,\"gameName\":\"QQ飞车端游\",\"pinyin\":\"Q\",\"gameIcon\":\"https://res.playfuncat.cn/game/logo/rjh7f7adrnu3.png\"},{\"gameId\":51,\"gameName\":\"阴阳师\",\"pinyin\":\"Y\",\"gameIcon\":\"https://res.playfuncat.cn/game/logo/bc5voy7oloqg.png\"},{\"gameId\":52,\"gameName\":\"战双弥帕什\",\"pinyin\":\"Z\",\"gameIcon\":\"https://res.playfuncat.cn/game/logo/zrw7wh6eu2u9.jpg\"},{\"gameId\":53,\"gameName\":\"奶块\",\"pinyin\":\"N\",\"gameIcon\":\"https://res.playfuncat.cn/game/logo/dni18x7y9eq2.png\"},{\"gameId\":54,\"gameName\":\"造梦西游4端游\",\"pinyin\":\"Z\",\"gameIcon\":\"https://res.playfuncat.cn/game/logo/wx5phk7nw2mx.png\"},{\"gameId\":55,\"gameName\":\"三国志战略版\",\"pinyin\":\"S\",\"gameIcon\":\"https://res.playfuncat.cn/game/logo/whl2mcxik878.jpg\"},{\"gameId\":56,\"gameName\":\"枪神纪\",\"pinyin\":\"Q\",\"gameIcon\":\"https://res.playfuncat.cn/game/logo/gt4bwk15a49t.jpg\"},{\"gameId\":57,\"gameName\":\"QQ炫舞手游\",\"pinyin\":\"Q\",\"gameIcon\":\"https://res.playfuncat.cn/game/logo/3m6pbzsvy9le.jpg\"},{\"gameId\":58,\"gameName\":\"QQ炫舞\",\"pinyin\":\"Q\",\"gameIcon\":\"https://res.playfuncat.cn/game/logo/imjhmec3mvo3.png\"},{\"gameId\":59,\"gameName\":\"幻塔\",\"pinyin\":\"H\",\"gameIcon\":\"https://res.playfuncat.cn/game/logo/tdurs2n3agey.jpg\"},{\"gameId\":60,\"gameName\":\"战舰世界\",\"pinyin\":\"Z\",\"gameIcon\":\"https://res.playfuncat.cn/game/logo/u48s16lze9ya.jpg\"},{\"gameId\":61,\"gameName\":\"崩坏3\",\"pinyin\":\"B\",\"gameIcon\":\"https://res.playfuncat.cn/game/logo/e283mvggrrkc.png\"},{\"gameId\":62,\"gameName\":\"一念逍遥\",\"pinyin\":\"Y\",\"gameIcon\":\"https://res.playfuncat.cn/game/logo/ikdd776v8pr6.png\"},{\"gameId\":63,\"gameName\":\"倩女幽魂手游\",\"pinyin\":\"Q\",\"gameIcon\":\"https://res.playfuncat.cn/game/logo/5z2f4h2ejy4c.png\"},{\"gameId\":64,\"gameName\":\"率土之滨\",\"pinyin\":\"S\",\"gameIcon\":\"https://res.playfuncat.cn/game/logo/qafqt66sph8m.png\"},{\"gameId\":65,\"gameName\":\"神武4手游\",\"pinyin\":\"S\",\"gameIcon\":\"https://res.playfuncat.cn/game/logo/r6tx3142f8ho.png\"},{\"gameId\":66,\"gameName\":\"神武4端游\",\"pinyin\":\"S\",\"gameIcon\":\"https://res.playfuncat.cn/game/logo/twfbkk4prtt7.png\"},{\"gameId\":67,\"gameName\":\"鹅鸭杀\",\"pinyin\":\"E\",\"gameIcon\":\"https://res.playfuncat.cn/game/logo/61ovgr5xzt4p.png\"},{\"gameId\":68,\"gameName\":\"荒野乱斗\",\"pinyin\":\"H\",\"gameIcon\":\"https://res.playfuncat.cn/game/logo/dlwzlkv1k9x1.png\"},{\"gameId\":69,\"gameName\":\"以闪亮之名\",\"pinyin\":\"Y\",\"gameIcon\":\"https://res.playfuncat.cn/game/logo/wqkxgwquhywn.png\"},{\"gameId\":70,\"gameName\":\"穿越火线端游\",\"pinyin\":\"C\",\"gameIcon\":\"https://res.playfuncat.cn/game/logo/q5mogoy32ufm.png\"},{\"gameId\":72,\"gameName\":\"APEX英雄\",\"pinyin\":\"A\",\"gameIcon\":\"https://res.playfuncat.cn/game/logo/sud9b75wabln.jpeg\"},{\"gameId\":73,\"gameName\":\"失落的方舟\",\"pinyin\":\"S\",\"gameIcon\":\"https://res.playfuncat.cn/game/logo/d3z3zrk87ye9.jpeg\"},{\"gameId\":74,\"gameName\":\"命运方舟\",\"pinyin\":\"M\",\"gameIcon\":\"https://res.playfuncat.cn/game/logo/rab7fgbrfn4d.jpeg\"},{\"gameId\":75,\"gameName\":\"FGO\",\"pinyin\":\"F\",\"gameIcon\":\"https://res.playfuncat.cn/game/logo/wnhqbsotmizu.jpeg\"},{\"gameId\":76,\"gameName\":\"逆战\",\"pinyin\":\"N\",\"gameIcon\":\"https://res.playfuncat.cn/game/logo/se2gzj5lnne4.jpeg\"},{\"gameId\":77,\"gameName\":\"明日方舟\",\"pinyin\":\"M\",\"gameIcon\":\"https://res.playfuncat.cn/game/logo/yelwnv2l3gpu.jpeg\"},{\"gameId\":78,\"gameName\":\"反恐精英OL\",\"pinyin\":\"F\",\"gameIcon\":\"https://res.playfuncat.cn/game/logo/d8crhcm8oubk.jpeg\"},{\"gameId\":79,\"gameName\":\"跑跑卡丁车\",\"pinyin\":\"P\",\"gameIcon\":\"https://res.playfuncat.cn/game/logo/d6zrifsyo362.jpeg\"},{\"gameId\":80,\"gameName\":\"斗战神\",\"pinyin\":\"D\",\"gameIcon\":\"https://res.playfuncat.cn/game/logo/wx6q6nsro17c.jpeg\"},{\"gameId\":81,\"gameName\":\"街头篮球\",\"pinyin\":\"J\",\"gameIcon\":\"https://res.playfuncat.cn/game/logo/p6ut9xc22w3h.jpeg\"},{\"gameId\":82,\"gameName\":\"超激斗梦境\",\"pinyin\":\"C\",\"gameIcon\":\"https://res.playfuncat.cn/game/logo/kmtwxyzgqu7z.jpeg\"},{\"gameId\":83,\"gameName\":\"奥比岛·梦想国度\",\"pinyin\":\"A\",\"gameIcon\":\"https://res.playfuncat.cn/game/logo/xrfl4mdefp9b.jpeg\"},{\"gameId\":84,\"gameName\":\"坦克世界\",\"pinyin\":\"T\",\"gameIcon\":\"https://res.playfuncat.cn/game/logo/srsv3gmjnc6e.jpeg\"},{\"gameId\":85,\"gameName\":\"神佑释放\",\"pinyin\":\"S\",\"gameIcon\":\"https://res.playfuncat.cn/game/logo/r1h8sg9rqomo.jpeg\"},{\"gameId\":86,\"gameName\":\"哈利波特\",\"pinyin\":\"H\",\"gameIcon\":\"https://res.playfuncat.cn/game/logo/w153tpli1m9y.jpeg\"},{\"gameId\":87,\"gameName\":\"其他手游\",\"pinyin\":\"Q\",\"gameIcon\":\"https://res.playfuncat.cn/game/logo/trbn5qiczl1d.jpeg\"},{\"gameId\":88,\"gameName\":\"崩坏学园2\",\"pinyin\":\"B\",\"gameIcon\":\"https://res.playfuncat.cn/game/logo/ifdz4gwdkr7w.jpeg\"},{\"gameId\":89,\"gameName\":\"超激斗梦境\",\"pinyin\":\"C\",\"gameIcon\":\"https://res.playfuncat.cn/game/logo/tnn4tdxuk98p.jpeg\"},{\"gameId\":90,\"gameName\":\"超击突破\",\"pinyin\":\"C\",\"gameIcon\":\"https://res.playfuncat.cn/game/logo/ahr99qzhdqxm.jpeg\"},{\"gameId\":91,\"gameName\":\"无畏契约\",\"pinyin\":\"W\",\"gameIcon\":\"https://res.playfuncat.cn/game/logo/az2nm1xqye17.png\"},{\"gameId\":92,\"gameName\":\"暗黑破坏神：不朽\",\"pinyin\":\"A\",\"gameIcon\":\"https://res.playfuncat.cn/game/logo/3o6vplxuaq2u.png\"},{\"gameId\":93,\"gameName\":\"阿拉德之怒\",\"pinyin\":\"A\",\"gameIcon\":\"https://res.playfuncat.cn/game/logo/3vt52zcs6g8z.jpg\"},{\"gameId\":94,\"gameName\":\"凹凸世界\",\"pinyin\":\"A\",\"gameIcon\":\"https://res.playfuncat.cn/game/logo/pkukealvbji1.png\"},{\"gameId\":95,\"gameName\":\"碧蓝航线\",\"pinyin\":\"B\",\"gameIcon\":\"https://res.playfuncat.cn/game/logo/xbdyhsqu8r73.png\"},{\"gameId\":96,\"gameName\":\"宝可梦大探险\",\"pinyin\":\"B\",\"gameIcon\":\"https://res.playfuncat.cn/game/logo/zb427m9gqori.png\"},{\"gameId\":97,\"gameName\":\"不良人3\",\"pinyin\":\"B\",\"gameIcon\":\"https://res.playfuncat.cn/game/logo/351uslq88wue.png\"},{\"gameId\":98,\"gameName\":\"百分之一\",\"pinyin\":\"B\",\"gameIcon\":\"https://res.playfuncat.cn/game/logo/df5fs59izo4s.png\"},{\"gameId\":99,\"gameName\":\"暴走英雄坛\",\"pinyin\":\"B\",\"gameIcon\":\"https://res.playfuncat.cn/game/logo/1gh2ym77lnmy.png\"},{\"gameId\":100,\"gameName\":\"光与夜之恋\",\"pinyin\":\"G\",\"gameIcon\":\"https://res.playfuncat.cn/game/logo/8qoeckz3b8uq.png\"},{\"gameId\":101,\"gameName\":\"多多自走棋\",\"pinyin\":\"D\",\"gameIcon\":\"https://res.playfuncat.cn/game/logo/cypwj9mm91ce.png\"},{\"gameId\":102,\"gameName\":\"对峙2\",\"pinyin\":\"D\",\"gameIcon\":\"https://res.playfuncat.cn/game/logo/z63ez7a1fqu5.png\"},{\"gameId\":103,\"gameName\":\"斗罗大陆手游\",\"pinyin\":\"D\",\"gameIcon\":\"https://res.playfuncat.cn/game/logo/7z5glfjqg6i1.jpg\"},{\"gameId\":104,\"gameName\":\"爱琳诗篇\",\"pinyin\":\"A\",\"gameIcon\":\"https://res.playfuncat.cn/game/logo/egykg4r4e5w4.png\"},{\"gameId\":105,\"gameName\":\"奥拉星手游\",\"pinyin\":\"A\",\"gameIcon\":\"https://res.playfuncat.cn/game/logo/84247sjqkyye.png\"},{\"gameId\":106,\"gameName\":\"艾尔多战记\",\"pinyin\":\"A\",\"gameIcon\":\"https://res.playfuncat.cn/game/logo/fo52pkc4aloe.jpg\"},{\"gameId\":107,\"gameName\":\"暗影战姬\",\"pinyin\":\"A\",\"gameIcon\":\"https://res.playfuncat.cn/game/logo/d5rsa9pvbdle.jpg\"},{\"gameId\":108,\"gameName\":\"奥比岛梦想国度\",\"pinyin\":\"A\",\"gameIcon\":\"https://res.playfuncat.cn/game/logo/o587qp35i4xu.jpg\"},{\"gameId\":109,\"gameName\":\"奥奇传说手游\",\"pinyin\":\"A\",\"gameIcon\":\"https://res.playfuncat.cn/game/logo/h73due73dazk.jpg\"},{\"gameId\":110,\"gameName\":\"奥特曼传奇英雄\",\"pinyin\":\"A\",\"gameIcon\":\"https://res.playfuncat.cn/game/logo/qj2kyqw16daq.jpg\"},{\"gameId\":111,\"gameName\":\"奥特曼系列OL\",\"pinyin\":\"A\",\"gameIcon\":\"https://res.playfuncat.cn/game/logo/py7zbunkzosj.jpg\"},{\"gameId\":112,\"gameName\":\"比特大爆炸\",\"pinyin\":\"B\",\"gameIcon\":\"https://res.playfuncat.cn/game/logo/ky1gfnpji8gj.jpg\"},{\"gameId\":113,\"gameName\":\"不思议迷宫\",\"pinyin\":\"B\",\"gameIcon\":\"https://res.playfuncat.cn/game/logo/i8xlu24ydfhp.jpg\"},{\"gameId\":114,\"gameName\":\"苍之骑士团2\",\"pinyin\":\"C\",\"gameIcon\":\"https://res.playfuncat.cn/game/logo/a8ghcyqhoum1.jpg\"},{\"gameId\":115,\"gameName\":\"唱舞全明星\",\"pinyin\":\"C\",\"gameIcon\":\"https://res.playfuncat.cn/game/logo/sph6o12sf6gg.jpg\"},{\"gameId\":116,\"gameName\":\"超凡先锋\",\"pinyin\":\"C\",\"gameIcon\":\"https://res.playfuncat.cn/game/logo/8wd1bkwf85kw.jpg\"},{\"gameId\":117,\"gameName\":\"尘白禁区\",\"pinyin\":\"C\",\"gameIcon\":\"https://res.playfuncat.cn/game/logo/u5no3kmwgrvf.png\"},{\"gameId\":118,\"gameName\":\"传骑世界3D\",\"pinyin\":\"C\",\"gameIcon\":\"https://res.playfuncat.cn/game/logo/4nazoicm8v2f.jpg\"},{\"gameId\":119,\"gameName\":\"传奇4\",\"pinyin\":\"Chuanqi4\",\"gameIcon\":\"https://res.playfuncat.cn/game/logo/gf1h8bvet46e.jpg\"},{\"gameId\":120,\"gameName\":\"传说对决先行服\",\"pinyin\":\"Chuanshuoduijiexianxingfu\",\"gameIcon\":\"https://res.playfuncat.cn/game/logo/5o8lq39zdrit.jpg\"},{\"gameId\":121,\"gameName\":\"春秋封神\",\"pinyin\":\"Chunqiufengshen\",\"gameIcon\":\"https://res.playfuncat.cn/game/logo/4jicxo5r49sd.png\"},{\"gameId\":122,\"gameName\":\"大话西游手游\",\"pinyin\":\"Dahuaxiyoushouyou\",\"gameIcon\":\"https://res.playfuncat.cn/game/logo/4j2jq9mhflvj.jpg\"},{\"gameId\":123,\"gameName\":\"代号鸢\",\"pinyin\":\"Daihaoqian\",\"gameIcon\":\"https://res.playfuncat.cn/game/logo/fad9wiqtjd1w.jpg\"},{\"gameId\":124,\"gameName\":\"弹壳特工队\",\"pinyin\":\"Danketegongdui\",\"gameIcon\":\"https://res.playfuncat.cn/game/logo/8pg737h76rdj.jpg\"},{\"gameId\":125,\"gameName\":\"弹力果冻\",\"pinyin\":\"Tanliguodong\",\"gameIcon\":\"https://res.playfuncat.cn/game/logo/bnnb1spc1d2y.jpg\"},{\"gameId\":126,\"gameName\":\"刀剑神域黑衣剑士王牌\",\"pinyin\":\"Daojianshenyuheiyijianshiwangpai\",\"gameIcon\":\"https://res.playfuncat.cn/game/logo/5drjvew7ocse.jpg\"},{\"gameId\":127,\"gameName\":\"道友请留步\",\"pinyin\":\"Daoyouqingliubu\",\"gameIcon\":\"https://res.playfuncat.cn/game/logo/que4vf4z6dfw.jpg\"},{\"gameId\":128,\"gameName\":\"地铁跑酷\",\"pinyin\":\"Ditiepaoku\",\"gameIcon\":\"https://res.playfuncat.cn/game/logo/43iki8vtuatk.jpg\"},{\"gameId\":129,\"gameName\":\"地铁逃生\",\"pinyin\":\"D\",\"gameIcon\":\"https://res.playfuncat.cn/game/logo/aekvrexrmh5y.jpg\"},{\"gameId\":130,\"gameName\":\"第七史诗\",\"pinyin\":\"Ditieshishi\",\"gameIcon\":\"https://res.playfuncat.cn/game/logo/pirlh7zwif79.jpg\"},{\"gameId\":131,\"gameName\":\"巅峰极速\",\"pinyin\":\"Dianfengjisu\",\"gameIcon\":\"https://res.playfuncat.cn/game/logo/xlyq2gev6rce.jpg\"},{\"gameId\":132,\"gameName\":\"斗罗大陆斗神再临\",\"pinyin\":\"Douluodaluzailin\",\"gameIcon\":\"https://res.playfuncat.cn/game/logo/k2jjjqtkicvj.jpg\"},{\"gameId\":133,\"gameName\":\"战斗法则\",\"pinyin\":\"Zhandoufazhe\",\"gameIcon\":\"https://res.playfuncat.cn/game/logo/kipqond91o6m.png\"},{\"gameId\":134,\"gameName\":\"最强NBA\",\"pinyin\":\"ZuiqiangNBA\",\"gameIcon\":\"https://res.playfuncat.cn/game/logo/fwbvmr8gpuq4.png\"},{\"gameId\":135,\"gameName\":\"战火勋章\",\"pinyin\":\"Zhanhuoxunzhang\",\"gameIcon\":\"https://res.playfuncat.cn/game/logo/79qxvj3zjlnh.png\"},{\"gameId\":136,\"gameName\":\"镇魂街·天生为王\",\"pinyin\":\"Zhenhunjietianshengweiwang\",\"gameIcon\":\"https://res.playfuncat.cn/game/logo/mzl46dxoe484.png\"},{\"gameId\":137,\"gameName\":\"镇魂街：武神觉醒\",\"pinyin\":\"Zhenhunjiewuhunjuexing\",\"gameIcon\":\"https://res.playfuncat.cn/game/logo/5dd6i4knxrv9.png\"},{\"gameId\":138,\"gameName\":\"造梦无双\",\"pinyin\":\"Zaomengwushuang\",\"gameIcon\":\"https://res.playfuncat.cn/game/logo/eoi5uq7v2asy.png\"},{\"gameId\":139,\"gameName\":\"蚁族崛起\",\"pinyin\":\"Yizujueqi\",\"gameIcon\":\"https://res.playfuncat.cn/game/logo/r66g97wnn1ot.png\"},{\"gameId\":140,\"gameName\":\"游戏王：决斗链接\",\"pinyin\":\"Youxiwangjuedoulianjie\",\"gameIcon\":\"https://res.playfuncat.cn/game/logo/j8q8akjpzlzo.png\"},{\"gameId\":141,\"gameName\":\"影之诗\",\"pinyin\":\"Yinzhishi\",\"gameIcon\":\"https://res.playfuncat.cn/game/logo/9v1xl78lzhml.png\"},{\"gameId\":142,\"gameName\":\"阴阳师：百闻牌\\t\\t\",\"pinyin\":\"Yinyangshibaiwenpai\",\"gameIcon\":\"https://res.playfuncat.cn/game/logo/ue5k49o9gxkg.png\"},{\"gameId\":143,\"gameName\":\"阴阳师妖怪屋\",\"pinyin\":\"Yinyangshiyaoguaiwu\",\"gameIcon\":\"https://res.playfuncat.cn/game/logo/kep9yzgzusww.png\"},{\"gameId\":144,\"gameName\":\"咸鱼之王\",\"pinyin\":\"Xianyuzhiwang\",\"gameIcon\":\"https://res.playfuncat.cn/game/logo/j5tvd6rnahpf.png\"},{\"gameId\":145,\"gameName\":\"小冰冰传奇\",\"pinyin\":\"Xiaoxiaobingchuanqi\",\"gameIcon\":\"https://res.playfuncat.cn/game/logo/saigy4q3nn6a.png\"},{\"gameId\":146,\"gameName\":\"寻道大千\",\"pinyin\":\"Xundaodaqian\",\"gameIcon\":\"https://res.playfuncat.cn/game/logo/6sfbinlpj7j9.png\"},{\"gameId\":147,\"gameName\":\"行界\",\"pinyin\":\"Xingjie\",\"gameIcon\":\"https://res.playfuncat.cn/game/logo/voevda8ni8pb.png\"},{\"gameId\":148,\"gameName\":\"星球：重启\",\"pinyin\":\"134\",\"gameIcon\":\"https://res.playfuncat.cn/game/logo/1tzpddnqjih2.png\"},{\"gameId\":149,\"gameName\":\"蔚蓝档案\",\"pinyin\":\"Weilandangan\",\"gameIcon\":\"https://res.playfuncat.cn/game/logo/ulig7mqn2ruq.png\"},{\"gameId\":150,\"gameName\":\"无期迷途\",\"pinyin\":\"Wuqimitu\",\"gameIcon\":\"https://res.playfuncat.cn/game/logo/uwjq377zqpiw.png\"},{\"gameId\":151,\"gameName\":\"妄想山海\",\"pinyin\":\"Wangxiangshanhai\",\"gameIcon\":\"https://res.playfuncat.cn/game/logo/5poimrbe67an.png\"},{\"gameId\":152,\"gameName\":\"我的世界\",\"pinyin\":\"Wodeshijie\",\"gameIcon\":\"https://res.playfuncat.cn/game/logo/bq7guneucu72.png\"},{\"gameId\":153,\"gameName\":\"万国觉醒\",\"pinyin\":\"Wanguojuexing\",\"gameIcon\":\"https://res.playfuncat.cn/game/logo/ci34gpsagmsk.png\"},{\"gameId\":154,\"gameName\":\"文明与征服\",\"pinyin\":\"Wenmingyuzhengfu\",\"gameIcon\":\"https://res.playfuncat.cn/game/logo/jx274242qpmy.png\"},{\"gameId\":155,\"gameName\":\"无尽的拉格朗日\",\"pinyin\":\"Wujindelagelangri\",\"gameIcon\":\"https://res.playfuncat.cn/game/logo/8skwxuja5xlo.png\"},{\"gameId\":156,\"gameName\":\"坦克世界闪击战\",\"pinyin\":\"Tankeshijiehsanjizhan\",\"gameIcon\":\"https://res.playfuncat.cn/game/logo/2wtmssi1x6j7.png\"},{\"gameId\":157,\"gameName\":\"逆水寒手游\",\"pinyin\":\"Nishuihan\",\"gameIcon\":\"https://res.playfuncat.cn/game/logo/1mypmd5y3o4g.png\"},{\"gameId\":158,\"gameName\":\"纳萨力克之王\",\"pinyin\":\"Nasalikezhiwang\",\"gameIcon\":\"https://res.playfuncat.cn/game/logo/7ybyiflmj7d9.png\"},{\"gameId\":159,\"gameName\":\"诺亚之星\",\"pinyin\":\"Nuoyazhixing\",\"gameIcon\":\"https://res.playfuncat.cn/game/logo/9u4p25nq8urj.png\"},{\"gameId\":160,\"gameName\":\"NIKKE胜利女神\",\"pinyin\":\"Nikkeshenglinvshen\",\"gameIcon\":\"https://res.playfuncat.cn/game/logo/m2r6kpdyopun.png\"},{\"gameId\":161,\"gameName\":\"全明星激斗\",\"pinyin\":\"Quanmingxingjidou\",\"gameIcon\":\"https://res.playfuncat.cn/game/logo/89lo78sylea3.png\"},{\"gameId\":162,\"gameName\":\"拳皇命运\",\"pinyin\":\"Quanwangmingyun\",\"gameIcon\":\"https://res.playfuncat.cn/game/logo/lk8v54h8nfyw.png\"},{\"gameId\":163,\"gameName\":\"全明星街球派对\",\"pinyin\":\"153\",\"gameIcon\":\"https://res.playfuncat.cn/game/logo/rl9ca6j78cu3.png\"},{\"gameId\":164,\"gameName\":\"千年之旅\",\"pinyin\":\"Qiannianzhilv\",\"gameIcon\":\"https://res.playfuncat.cn/game/logo/fgqjtabizq3w.png\"},{\"gameId\":165,\"gameName\":\"七人传奇光与暗之交战\",\"pinyin\":\"Qirenchuanshuoyuanzhijiaozhan\",\"gameIcon\":\"https://res.playfuncat.cn/game/logo/ub8lxbxng3p2.png\"},{\"gameId\":166,\"gameName\":\"雀魂\",\"pinyin\":\"Quehun\",\"gameIcon\":\"https://res.playfuncat.cn/game/logo/tz4pm5zpql87.png\"},{\"gameId\":167,\"gameName\":\"黎明觉醒:生机\",\"pinyin\":\"Liminjuexingshengji\",\"gameIcon\":\"https://res.playfuncat.cn/game/logo/dfqmjrri9hwg.png\"},{\"gameId\":168,\"gameName\":\"森之国度\",\"pinyin\":\"Senzhiguodu\",\"gameIcon\":\"https://res.playfuncat.cn/game/logo/izznazs1hlr9.png\"},{\"gameId\":169,\"gameName\":\"荣耀全明星\",\"pinyin\":\"Rongyaoquanminxing\",\"gameIcon\":\"https://res.playfuncat.cn/game/logo/3zo9i6wgu744.png\"},{\"gameId\":170,\"gameName\":\"忍者必须死3\",\"pinyin\":\"Renzhebixusi\",\"gameIcon\":\"https://res.playfuncat.cn/game/logo/3z72cku8xyya.png\"},{\"gameId\":171,\"gameName\":\"曙光英雄\",\"pinyin\":\"Shuguangyingxiong\",\"gameIcon\":\"https://res.playfuncat.cn/game/logo/2dnmz9cuxymf.png\"},{\"gameId\":172,\"gameName\":\"闪耀优骏少女\",\"pinyin\":\"162\",\"gameIcon\":\"https://res.playfuncat.cn/game/logo/d28i1qyw6x4h.png\"},{\"gameId\":173,\"gameName\":\"数码宝贝新世纪\",\"pinyin\":\"Shumabaobeixinshiji\",\"gameIcon\":\"https://res.playfuncat.cn/game/logo/adyunjm1upfc.png\"},{\"gameId\":174,\"gameName\":\"三国志幻想大陆\",\"pinyin\":\"Sanguozhihuanxaingdalu\",\"gameIcon\":\"https://res.playfuncat.cn/game/logo/y3tnknrne8li.png\"},{\"gameId\":175,\"gameName\":\"天龙八部手游\",\"pinyin\":\"Tianlongbabu\",\"gameIcon\":\"https://res.playfuncat.cn/game/logo/voelk3eifck8.png\"},{\"gameId\":176,\"gameName\":\"天龙八部手游2\",\"pinyin\":\"163\",\"gameIcon\":\"https://res.playfuncat.cn/game/logo/rq49nh3fni2x.png\"},{\"gameId\":177,\"gameName\":\"天地劫：幽城再临\",\"pinyin\":\"164\",\"gameIcon\":\"https://res.playfuncat.cn/game/logo/4sdm7m5okqbm.png\"},{\"gameId\":178,\"gameName\":\"吞噬星空：黎明\",\"pinyin\":\"165\",\"gameIcon\":\"https://res.playfuncat.cn/game/logo/k5pnjkikec9t.png\"},{\"gameId\":179,\"gameName\":\"300英雄手游\",\"pinyin\":\"Sanbaiyingxiong\",\"gameIcon\":\"https://res.playfuncat.cn/game/logo/aaa8d6xqxcqc.png\"},{\"gameId\":180,\"gameName\":\"深空之眼\",\"pinyin\":\"Shenkongzhiyan\",\"gameIcon\":\"https://res.playfuncat.cn/game/logo/nkq539ylgruc.png\"},{\"gameId\":181,\"gameName\":\"世界弹射物语\",\"pinyin\":\"Shijietanshewuyu\",\"gameIcon\":\"https://res.playfuncat.cn/game/logo/hblwf6ue5chh.png\"},{\"gameId\":182,\"gameName\":\"谁是卧底\",\"pinyin\":\"Shuishiwodi\",\"gameIcon\":\"https://res.playfuncat.cn/game/logo/zrayshg4uyuo.png\"},{\"gameId\":183,\"gameName\":\"少女乐团派对\",\"pinyin\":\"Shaonvyuetuanpaidui\",\"gameIcon\":\"https://res.playfuncat.cn/game/logo/ic4omu948xem.png\"},{\"gameId\":184,\"gameName\":\"三国志战旗版\",\"pinyin\":\"Sanguozhizhanqiban\",\"gameIcon\":\"https://res.playfuncat.cn/game/logo/e2g9hjx6mvqp.png\"},{\"gameId\":185,\"gameName\":\"时空中的绘旅人\",\"pinyin\":\"Shikongzhongdehuilvren\",\"gameIcon\":\"https://res.playfuncat.cn/game/logo/k8d1e5x729ge.png\"},{\"gameId\":186,\"gameName\":\"时空猎人3\",\"pinyin\":\"Shikonglieren3\",\"gameIcon\":\"https://res.playfuncat.cn/game/logo/olhuw294yehu.png\"},{\"gameId\":187,\"gameName\":\"元梦之星\",\"pinyin\":\"Yuanmengzhixing\",\"gameIcon\":\"https://res.playfuncat.cn/game/logo/vnbhc9znc41y.png\"},{\"gameId\":188,\"gameName\":\"元气骑士\",\"pinyin\":\"Y\",\"gameIcon\":\"https://res.playfuncat.cn/game/logo/ioacghjjxurg.png\"},{\"gameId\":189,\"gameName\":\"灌篮高手\",\"pinyin\":\"G\",\"gameIcon\":\"https://res.playfuncat.cn/game/logo/2s93ytyt7pwk.png\"},{\"gameId\":190,\"gameName\":\"重返未来1999\",\"pinyin\":\"25\",\"gameIcon\":\"https://res.playfuncat.cn/game/logo/1zea51wciqvb.jpg\"},{\"gameId\":191,\"gameName\":\"生死狙击1\",\"pinyin\":\"S\",\"gameIcon\":\"https://res.playfuncat.cn/game/logo/wczmkqb8z485.jpeg\"},{\"gameId\":192,\"gameName\":\"海岛奇兵\",\"pinyin\":\"H\",\"gameIcon\":\"https://res.playfuncat.cn/game/logo/92mjceoxh1v7.png\"},{\"gameId\":193,\"gameName\":\"鸣潮\",\"pinyin\":\"MingChao\",\"gameIcon\":\"https://res.playfuncat.cn/game/logo/35domjw7q3xv.png\"},{\"gameId\":194,\"gameName\":\"dnf手游\",\"pinyin\":\"D\",\"gameIcon\":\"https://res.playfuncat.cn/game/logo/8ff8x4z4woma.png\"},{\"gameId\":195,\"gameName\":\"绝区零\",\"pinyin\":\"J\",\"gameIcon\":\"https://res.playfuncat.cn/game/logo/6qocb9w6bvl5.png\"},{\"gameId\":196,\"gameName\":\"永劫无间手游\",\"pinyin\":\"Y\",\"gameIcon\":\"https://res.playfuncat.cn/game/logo/1l7y9m2kwjdf.jpg\"},{\"gameId\":197,\"gameName\":\"三角洲行动\",\"pinyin\":\"S\",\"gameIcon\":\"https://res.playfuncat.cn/game/logo/oz4zu67n2rze.jpg\"}]\n";
        List<JSONObject> jsonObjects = JSONObject.parseArray(result, JSONObject.class);
        List<GamesRes> gamesResList = new ArrayList<>();

        for (JSONObject jsonObject : jsonObjects) {
            GamesRes gamesRes = new GamesRes();
            String id = jsonObject.getString("gameId");
            String title = jsonObject.getString("gameName");
            gamesRes.setId(id);
            gamesRes.setGameName(title);
            gamesResList.add(gamesRes);
        }
        return gamesResList;
    }

    @Override
    public List<InterServerRes> getServer(String gameId, SalePartner salePartner) {
        String url = "https://api.playfuncat.cn/cat/v1/mer/import/qryGameSrv";
        Map<String,Object> params = new HashMap<>();
        params.put("id",gameId);
        String response = HttpRequest.post(url).body(JSONObject.toJSONString(params)).execute().body();
        JSONObject jsonObject = JSONObject.parseObject(response);
        List<JSONObject> data = JSONObject.parseArray(jsonObject.getString("result"), JSONObject.class);

        List<InterServerRes> interServerRes = new ArrayList<>();
        for (JSONObject datum : data) {
            InterServerRes interServer = new InterServerRes();
            interServer.setId(datum.getString("srvId"));
            interServer.setName(datum.getString("srvName"));
            interServer.setUuid(UUIDGenerator.generateUuid6());
            String servers = datum.getString("childrenNode");
            if(StringUtils.isNotEmpty(servers)) {
                List<InterServerRes> interServerRes1 = new ArrayList<>();
                List<JSONObject> jsonObjects = JSONObject.parseArray(servers, JSONObject.class);
                for (JSONObject object : jsonObjects) {
                    InterServerRes interServer1 = new InterServerRes();
                    String id1 = object.getString("id");
                    String title1 = object.getString("areaName");
                    interServer1.setId(id1);
                    interServer1.setName(title1);
                    interServer1.setUuid(UUIDGenerator.generateUuid6());
                    interServerRes1.add(interServer1);
                }
                interServer.setInterServerRes(interServerRes1);
            }
            interServerRes.add(interServer);
        }
        return interServerRes;
    }

    @Override
    public List<InterAttrRes> getPropety(String gameId, String type, SalePartner salePartner) {
        String url = "https://api.playfuncat.cn/cat/v1/mer/import/qryGameConfParam";
        Map<String,Object> params = new HashMap<>();
        params.put("id",gameId);
        String response = HttpRequest.post(url).body(JSONObject.toJSONString(params)).execute().body();
        JSONObject jsonObject = JSONObject.parseObject(response);
        List<JSONObject> data = JSONObject.parseArray(jsonObject.getString("result"), JSONObject.class);
        List<JSONObject> collect = new ArrayList<>();
        if (Objects.equals("1",type)){
            collect = data.stream().filter(d -> d.getString("type").equals("select")).collect(Collectors.toList());
        }else if  (Objects.equals("2",type)){
            collect = data.stream().filter(d -> d.getString("type").equals("multiSelect")).collect(Collectors.toList());
        }else if (Objects.equals("3",type)){
            collect = data.stream().filter(d -> d.getString("type").equals("input")).collect(Collectors.toList());
        }
        List<InterAttrRes> interAttrResList = new ArrayList<>();
        for (JSONObject object : collect) {
            InterAttrRes interAttrRes = new InterAttrRes();
            interAttrRes.setUuid(UUIDGenerator.generateUuid6());
            interAttrRes.setId(object.getString("cnName"));
            interAttrRes.setName(object.getString("enName"));
            List<InterAttrRes> interAttrResList1 = new ArrayList<>();
            String options = object.getString("options");
            if(StringUtils.isNotEmpty(options)) {
                JSONArray jsonArray = JSONArray.parseArray(options);
                for (Object o : jsonArray) {
                    InterAttrRes interAttrRes1 = new InterAttrRes();
                    interAttrRes1.setUuid(UUIDGenerator.generateUuid6());
                    interAttrRes1.setId(o.toString());
                    interAttrRes1.setName(o.toString());
                    interAttrResList1.add(interAttrRes1);
                    interAttrRes.setInterServerRes(interAttrResList1);
                }
            }
            interAttrResList.add(interAttrRes);
        }
        return interAttrResList;
    }
}